/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.cef.event;

import cef.event.Event;

import coalescent.br.BRSPopGen;
import coalescent.br.BRWComp;

import java.util.List;

/**
 * Corresponds to command {@link coalescent.cef.command.RunBackwardRecursionCommand}. {@code RunRecursionCommand}
 * calculates the specified population genetic recursion along with a number of specified computations based on it.
 *
 * @author Susanta Tewari
 * @version 2.0.0
 * @history Created on Created on 04/21/2012
 * @since 2.0.0
 */
public interface RunBackwardRecursionEvent extends Event {

    /**
     * Recursion is used on this instance of statistic to perform the chosen computations in {@link
     * #getBRWalkerComputations()}.
     *
     * @return an instance of population genetic statistic
     */
    BRSPopGen<?, ?, ?, ?, ?, ?, ?> getBackwardRecursion();

    /**
     * The listeners are mutable objects supposed to be modified by {@link coalescent.br.BRWComp}. The relevant command
     * should cache the values, else, {@link IllegalStateException} may be thrown.
     *
     * @return the listeners attached to the exact recursion
     */
    List<BRWComp<?, ?>> getBRWalkerComputations();
}
